package com.wntms.wgj.service.impl;

import com.wntms.wgj.dao.CollectionSettleDao;
import com.wntms.wgj.dao.FreightContractDaos;
import com.wntms.wgj.pojo.CollectionSettle;
import com.wntms.wgj.pojo.FreightContracts;
import com.wntms.wgj.service.ChangesBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class ChangesBusinessServiceImpl implements ChangesBusinessService {
    @Autowired
    private CollectionSettleDao collectionSettleDao;

    @Autowired
    private FreightContractDaos freightContractDao;

    @Override
    public List<CollectionSettle> findAll() {
        return collectionSettleDao.findAll();
    }


    /**
     * 修改变更货款数
     * @param collectionSettle
     * @return
     */
    @Override
    public boolean updateBusiness(CollectionSettle collectionSettle) {
        return collectionSettleDao.updateBusiness(collectionSettle) == 1 ? true:false;
    }

    /**
     * 修改返款类型
     * @param freightContracts
     * @return
     */
    @Override
    public boolean updateRe(FreightContracts freightContracts) {
        return freightContractDao.updateRe(freightContracts) == 1 ? true:false;
    }


}
